package com.kqb.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 销售订单
 * erp_sales_order
 */
@Data
@ApiModel("销售订单表")
public class ErpSalesOrder implements Serializable {
    private Integer id;

    /**
     * 销售人员
     */
    @ApiModelProperty(value = "销售人员")
    private Integer salesId;

    /**
     * 销售人员姓名
     */
    @ApiModelProperty(value = "销售人员")
    private String salesName;
    /**
     * 快递方式: [agent-货代, self-客户自己的快递]
     */
    @ApiModelProperty(value = "快递方式: [agent-货代, self-客户自己的快递]")
    private String expressMode;

    /**
     * 客户询价的询价单号
     */
    @ApiModelProperty(value = "客户询价的询价单号")
    private String customerInquirySn;

    /**
     * 询价客户ID
     */
    @ApiModelProperty(value = "询价客户ID")
    private Integer customerId;

    /**
     * 客户邮箱
     */
    @ApiModelProperty(value = "客户邮箱")
    private String customerEmail;

    /**
     * 客户手机号
     */
    @ApiModelProperty(value = "客户手机号")
    private String customerMobile;

    /**
     * 客户公司电话
     */
    @ApiModelProperty(value = "客户公司电话")
    private String customerCompanyMobile;

    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    private String sn;

    /**
     * PO编号
     */
    @ApiModelProperty(value = "PO编号", required = true)
    private String poNumber;

    /**
     * 定金日期
     */
    @ApiModelProperty(value = "定金日期", required = true)
    private Integer depositDate;

    /**
     * 定金比例
     */
    @ApiModelProperty(value = "定金比例", required = true)
    private Integer depositRatio;

    /**
     * 收款银行
     */
    @ApiModelProperty(value = "收款银行", required = true)
    private String receivingBank;

    /**
     * 币种
     */
    @ApiModelProperty(value = "币种", required = true)
    private String currency;

    /**
     * 定金支付水单金额
     */
    @ApiModelProperty(value = "定金支付水单金额", required = true)
    private BigDecimal amountOrMemo;

    /**
     * 未付余款金额
     */
    @ApiModelProperty(value = "未付余款金额", required = true)
    private BigDecimal balanceAmount;

    /**
     * 订单类型: [new-新单,continue-续单,user-根据用户确认]
     */
    @ApiModelProperty(value = "订单类型: [new-新单,continue-续单,user-根据用户确认]", required = true)
    private String orderType;

    /**
     * 询价日期
     */
    @ApiModelProperty(value = "询价日期", required = true)
    private Integer inquiryDate;

    /**
     * 照片素材
     */
    @ApiModelProperty(value = "照片素材", required = true)
    private String photoMetrial;

    /**
     * 成交条款及运费
     */
    @ApiModelProperty(value = "成交条款及运费")
    private String termsAndFreight;

    /**
     * 折扣
     */
    @ApiModelProperty(value = "折扣")
    private String discount;

    /**
     * 完工天数
     */
    @ApiModelProperty(value = "完工天数", required = true)
    private String daysOfCompletion;

    /**
     * 付款条件
     */
    @ApiModelProperty(value = "付款条件", required = true)
    private String termsOfPayment;

    /**
     * 剩余交期
     */
    @ApiModelProperty(value = "剩余交期", required = true)
    private String rdp;

    /**
     * 预计完工日期
     */
    @ApiModelProperty(value = "预计完工日期", required = true)
    private Integer eCompletionDate;

    /**
     * 设备类型
     */
    @ApiModelProperty(value = "设备类型")
    private String equipmentType;

    /**
     * 状态: [0-未生产,1-生产中,2-待发货,3-发货中,4-已处理,5-延期,6-售后]
     */
    @ApiModelProperty(value = "状态: [0-未生产,1-生产中,2-待发货,3-发货中,4-已处理,5-延期,6-售后]", required = true)
    private Integer status;

    /**
     * 开船状态: [0-未开船,1-已开船]
     */
    @ApiModelProperty(value = "开船状态: [0-未开船,1-已开船]", required = true)
    private Integer sailingState;

    /**
     * 提成
     */
    @ApiModelProperty(value = "提成")
    private BigDecimal commission;

    /**
     * 首次提成
     */
    @ApiModelProperty(value = "首次提成")
    private BigDecimal firstCommission;

    /**
     * 二次提成
     */
    @ApiModelProperty(value = "二次提成")
    private BigDecimal secondCommission;

    /**
     * 应收金额
     */
    @ApiModelProperty(value = "应收金额")
    private BigDecimal receivableAmount;

    /**
     * 应付金额
     */
    @ApiModelProperty(value = "应付金额")
    private BigDecimal payableAmount;

    /**
     * 毛利润
     */
    @ApiModelProperty(value = "毛利润")
    private BigDecimal grossProfit;

    /**
     * 毛利率
     */
    @ApiModelProperty(value = "毛利率")
    private Double grossProfitMargin;

    /**
     * 是否申请发货
     */
    @ApiModelProperty(value = "是否申请发货")
    private Boolean applyDelivery;

    /**
     * 申请发货描述
     */
    @ApiModelProperty(value = "申请发货描述")
    private String applyDeliveryDesc;

    /**
     * 发货审核: [0-未申请,1-已通过,-1-未通过]
     */
    @ApiModelProperty(value = "发货审核: [0-未申请,1-已通过,-1-未通过]")
    private Boolean deliveryStatus;

    /**
     * 发货审核未通过原因
     */
    @ApiModelProperty(value = "发货审核未通过原因")
    private String deliveryRefundDesc;
    @ApiModelProperty(value = "销售订单合同")
    private ErpSalesOrderContract erpSalesOrderContract;
    @ApiModelProperty(value = "销售订单技术要求细节")
    private ErpSalesOrderDetails erpSalesOrderDetails;
    @ApiModelProperty(value = "销售订单商品")
    private ArrayList<ErpSalesOrderProduct> erpSalesOrderProducts;
    private static final long serialVersionUID = 1L;
}